package sk.octopuss.archery.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import sk.octopuss.archery.dao.BrandDao;
import sk.octopuss.archery.domain.Brand;
import sk.octopuss.archery.service.AbstractGenericService;
import sk.octopuss.archery.service.BrandService;
/**
 * 
 * @author Ivan Dolezal
 * Service for handling Brands
 */
@Service
public class BrandServiceImpl extends AbstractGenericService implements BrandService {
	
	/**
	 * DAO for accessing all Brand entities
	 */
	@Autowired
	private BrandDao brandDao;

	@Override
	public Brand find(final Long id) {
		return brandDao.find(id);
	}

	@Override
	public List<Brand> findAll() {
		return brandDao.findAll();
	}

	@Override
	public List<Brand> findAllByName(final String name) {
		return brandDao.findAllByName(name);
	}

	@Override
	public List<Brand> findAllEntries(final int firstResult, final int maxResults) {
		return brandDao.findAllEntries(firstResult, maxResults);
	}

	@Override
	public long countItems() {
		return brandDao.countAll();
	}

	@Override
	public long save(final Brand brand) {
		return brandDao.save(brand);
	
	}

	@Override
	public void remove(final Brand entity) {
		// TODO Auto-generated method stub
		
	}

}
